Tower of Hanoi
The Tower of Hanoi or Towers of Hanoi is a mathematical game or puzzle. It consists of three pegs, and a number of disks of different sizes which can slide onto any peg. The puzzle starts with the disks neatly stacked in order of size on one peg, the smallest at the top, thus making a conical shape. The objective of the puzzle is to move the entire stack to another peg, obeying the following rules: * Only one disk may be moved at a time. * Each move consists of taking the upper disk from one of the pegs and sliding it onto another peg, on top of the other disks that may already be present on that peg. * No disk may be placed on top of a smaller disk. Origins The puzzle was invented by the French mathematician Édouard Lucas in 1883. There is a legend about an Indian temple which contains a large room with three time-worn posts in it surrounded by 64 golden disks. The priests of Brahma, acting out the command of an ancient prophecy, have been moving these disks, in accordance with the rules of the puzzle. According to the legend, when the last move of the puzzle is completed, the world will end. The puzzle is therefore also known as the Tower of Brahma puzzle. It is not clear whether Lucas invented this legend or was inspired by it. The Tower of Hanoi is a problem often used to teach beginning programming, in particular, as an example of a simple recursive algorithm. If the legend were true, and if the priests were able to move disks at a rate of one per second, using the smallest number of moves, it would take them 264−1 seconds or roughly 600 billion years (operation taking place is \frac Online demonstrations * Tower of Hanoi Interactivity Raptivity Customizable Interaction Model(CIM) for the Tower of Hanoi. * Tower Of Hanoi Game developed using Javascript * A JavaScript implementation featuring Shuffle disks and Help buttons * An online Java demonstration of this famous puzzle: allows trying to solve for up to 20 disks, or lets the computer solve. * An online flash demonstration of this famous puzzle: allows trying to solve for n disks (with n being a maximum of ten disks). * Multipeg Tower of Hanoi Graphs. * Simple 4 disk demonstration of Towers of Hanoi. * Tower of Hanoi implement in Java. * A Multi-Peg Tower of Hanoi Applet. * Tower Of Hanoi Animation. * Tower of Hanoi Flash Game: a Flash implementation of the Tower of Hanoi game. * Oshiro: A flash game with Tower of Hanoi concept incorporated with colors, different board, and different end goals. * Towers of Hanoi by Jay Warendorff based on a program by Jaime Rangel-Mondragón, The Wolfram Demonstrations Project. History * Tower of Hanoi Facts Algorithm * Theory, recursive and a per step algorithms with Java implementation at cut-the-knot * Towers Of Hanoi in c++ using Stacks at 24bytes * Bicolor Tower of Hanoi at cut-the-knot * Hanoimania, implementations of the Tower of Hanoi problem in over 100 different programming environments and languages * Towers of Hanoi Online game * Play Towers of Hanoi Online *Binary Numbers and the Standard Gray Code, with a diskussion of the Gray Code solution * Some implementations including a mysterious binary solution * Tower of Hanoi game for Palm OS * A variety of Tower of Hanoi Algorithms in PLT MzScheme * Solution in an all web-based interactive classical BASIC environment * Two non-recursive solutions in C++ Events Category:Problem solving